<?php
namespace Account\Controller;
use Think\Controller;
use Think\Model;
class BaseController extends Controller {
	function __construct(){
		parent::__construct();
		if(session('?user_account')){
			if(!session('?shopcar_count')){
				$shopcar = D('ShopCar');
				$count = $shopcar->where('user_id='.session('user_account.id'))->count('id');
				session('shopcar_count',$count);
			}
			$array['shopcar_count'] = session('shopcar_count');
			$array['user_account'] = session('user_account');
			$this->assign($array);
		}
	}
}